<template>
  <div class="app">
    <h1>我是App组件（祖），{{name}}---{{price}}</h1>
  </div>
</template>

<script>
import {ref,reactive, readonly, toRefs,isReactive,isRef,isProxy,isReadonly} from 'vue'

export default {
  name: 'App',
  setup(){
    let car=reactive({name:'奔驰',price:'40w'})
    let x=ref(0)
    let car2=readonly(car)

    console.log("isReactive(car)",isReactive(car))
    console.log("isRef(x)",isRef(x))
    console.log("isReadonly(car2)",isReadonly(car2))
    console.log("isProxy(car2)",isProxy(car2))


    return{
      ...toRefs(car)
    }
  },
}
</script>

<style scoped>
.app{
  background-color: gray;
  padding: 10px;
}
</style>
